/**
 * 整个项目api 管理
 */
import ManualClassTask from "@/views/course/ManualClassTask.vue";
import request from "./request";
export default {

    // 学生登录
    loginStudnet(params: any){
        return request({
            url: `/student/login`,
            method: 'post',
            mock: false,
            data: params
        })
    },
    // 教师登录
    loginTeacher(params: any){
        return request({
            url: `/teacher/login`,
            method: 'post',
            mock: false,
            data: params
        })
    },
    // 管理员登录
    loginAdmin(params: any){
        return request({
            url: `admin/login`,
            method: 'post',
            mock: false,
            data: params
        })
    },
    // 获取系统数据
    systemData(){
        return request({
            url: `systemdata`,
            method: 'get',
            mock: false,
        })
    },
    // 添加班级
    addClassinfo(params: any){
        return request({
            url: `classinfo/add`,
            method: 'post',
            mock: false,
            data: params
        })
    },
    // 根据ID更新班级
    modifyClassinfo(id:any ,params: any){
        return request({
            url: `classinfo/modify/${id}`,
            method: 'post',
            mock: false,
            data: params
        })
    },
    // 根据ID删除教室
    deleteClassinfoById(id: any){
        return request({
            url: `classinfo/delete/${id}`,
            method: 'delete',
            mock: false,
        })
    },
    // 获取所有教师
    allTeacher(){
        return request({
            url: `teacher/all`,
            method: 'get',
            mock: false,
        })
    },
    //查询班级信息带详细信息
    queryClassInfos(value : any, gradeNo : any){
        return request({
            url: `queryclassinfo/${value}?gradeNo=${gradeNo}`,
            method: 'get',
            mock: false,
        })
    },
    // 添加教室
    addClassroom(params: any){
        return request({
            url: `classroom/add`,
            method: 'post',
            mock: false,
            data: params
        })
    },
    // 根据ID更新教室
    modifyClassroom(params: any){
        return request({
            url: `classroom/modify`,
            method: 'post',
            mock: false,
            data: params
        })
    },
    // 根据ID删除教室
    deleteClassroomById(id: any){
        return request({
            url: `classroom/delete/${id}`,
            method: 'delete',
            mock: false,
        })
    },
    // 获取所有教室
    allClassroom(page: any){
        return request({
            url: `classroom/${page}`,
            method: 'get',
            mock: false,
        })
    },
    // 添加提交任务
    addClasstask(params: any){
        return request({
            url: `addclasstask`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    modifyClasstask(params: any){
        return request({
            url: `modifyclasstask`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    // 点击开始提交学期到系统后台排课
    arrangeCourse(semester: any){
        return request({
            url: `arrange/${semester}`,
            method: 'post',
            mock: false,
        })
    },
    // 删除开课任务
    deleteClasstask(id: any){
        return request({
            url: `deleteclasstask/${id}`,
            method: 'delete',
            mock: false,
        })
    },
    // 获取学期
    getSemester(){
        return request({
            url: `semester`,
            method: 'get',
            mock: false,
        })
    },
    // 获得所有开课任务
    allClassTask(page : any, semester: any){
        return request({
            url: `classtask/${page}/${semester}`,
            method: 'get',
            mock: false,
        })
    },
    // 分页查询所有教材信息
    allCourseInfo(page : any){
        return request({
            url: `courseinfo/${page}`,
            method: 'get',
            mock: false,
        })
    },
    // 添加教材
    addCourseInfo(params: any){
        return request({
            url: `courseinfo/add`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    // 根据id删除教材信息
    deleteCourseInfoById(id: any){
        return request({
            url: `courseinfo/delete/${id}`,
            method: 'delete',
            mock: false,
        })
    },
    // 更新教材信息
    modifyCourseInfo(id :any , params: any){
        return request({
            url: `courseinfo/modify/${id}`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    // 根据关键字搜索交材信息
    searchCourseinfo(page : any, keyword: any){
        return request({
            url: `courseinfo/search/${page}/${keyword}`,
            method: 'get',
            mock: false,
        })
    },
    // 获取课程编号
    CourseInfoGetno(){
        return request({
            url: `courseinfo/get-no`,
            method: 'get',
            mock: false,
        })
    },
    // 查询班级编号，班级名
    queryClass(value : any){
        return request({
            url: `class-grade/${value}`,
            method: 'get',
            mock: false,
        })
    },
     
    // 根据班级查询学生信息
    queryStudentByClass(page : any, value: any){
        return request({
            url: `student-class/${page}/${value}`,
            method: 'get',
            mock: false,
        })
    },
    // 查询所有学生
    allStudent(page : any){
        return request({
            url: `student/students/${page}`,
            method: 'get',
            mock: false,
        })
    },
    // 关键字查询学生
    searchStudent(keyword : any){
        return request({
            url: `student/search/${keyword}`,
            method: 'get',
            mock: false,
        })
    },
     // 根据id删除学生信息
     deleteStudentById(id: any){
        return request({
            url: `student/delete/${id}`,
            method: 'delete',
            mock: false,
        })
    },
    // 学生信息修改
    modifyStudent(id :any , params: any){
        return request({
            url: `student/modify/${id}`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    // 添加教学区域
    setTeachArea(params: any){
        return request({
            url: `setteacharea`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    // 所有教学区域安排
    allLocation(page : any){
        return request({
            url: `locations/${page}`,
            method: 'get',
            mock: false,
        })
    },
    // 根据id删除教学区域信息
    deleteLocationById(id: any){
        return request({
            url: `location/delete/${id}`,
            method: 'delete',
            mock: false,
        })
    },
    // 获取所有教学楼信息
    teachbuildinfoList(){
        return request({
            url: `teachbuildinfo/list`,
            method: 'get',
            mock: false,
        })
    },
    // 添加教学楼
    addTeachBuildInfo(params: any){
        return request({
            url: `teachbuildinfo/add`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    // 获取所有教学楼，带分页
    allTeachBuildInfo(page : any){
        return request({
            url: `teachbuildinfo/list/${page}`,
            method: 'get',
            mock: false,
        })
    },
    // 更新教学楼
    modifyTeachBuildInfo(id :any , params: any){
        return request({
            url: `teachbuildinfo/modify/${id}`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    // 删除教学楼
    deleteTeachBuildingById(id: any){
        return request({
            url: `teachbuildinfo/delete/${id}`,
            method: 'delete',
            mock: false,
        })
    },
    // 获取讲师的编号
    getTeacherNo(){
        return request({
            url: `teacher/no`,
            method: 'get',
            mock: false,
        })
    },
    // 添加讲师
    addTeacher(params : any){
        return request({
            url: `teacher/add`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    // 修改讲师
    modifyTeacher(params: any){
        return request({
            url: `teacher/modify`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    // 删除讲师
    deleteTeacherById(id: any){
        return request({
            url: `teacher/delete/${id}`,
            method: 'delete',
            mock: false,
        })
    },
    // 关键字查询讲师
    searchTeacher(page : any, keyword : any){
        return request({
            url: `teacher/search/${page}/${keyword}`,
            method: 'get',
            mock: false,
        })
    },
    // 全部讲师
    allTeacherQuery(page : any){
        return request({
            url: `teacher/query/${page}`,
            method: 'get',
            mock: false,
        })
    },
    // 管理员修改密码
    passwordAdmin(params: any){
        return request({
            url: `admin/password`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    // 学生修改密码
    passwordStudnet(params: any){
        return request({
            url: `student/password`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    // 讲师修改密码
    passwordTeacher(params: any){
        return request({
            url: `teacher/password`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    // 提交学生信息
    saveStudnet(id:any, classNo:any){
        return request({
            url: `student/join/${id}/${classNo}`,
            method: 'post',
            mock: false,
        })
    },
    // 根据教学楼编号查询空教室
    emptyClassroom(teachbuildNo : any){
        return request({
            url: `classroom/empty/${teachbuildNo}`,
            method: 'get',
            mock: false,
        })
    },

    // 获取所有的课程信息
    getCourseplanall(){
        return request({
            url: 'courseplanall',
            method: 'get',
            mock: false,
        })
    },
    // 给学生创建学号
    createStudentNo(grade : any){
        return request({
            url: `student/createno/${grade}`,
            method: 'post',
            mock: false,
        })
    },
    // 学生注册
    register(params : any){
        return request({
            url: 'student/register',
            method: 'post',
            data: params,
            mock: false,
        })
    },
     // 查询课程表
     queryCourseplan(value : any){
        return request({
            url: `courseplan/${value}`,
            method: 'get',
            mock: false,
        })
    },
    // 根据 讲师编号 获取 课程表
    queryCoursePlanByTeacherNo(teacherNo: any){
        return request({
            url: `courseplanTeacherNo/${teacherNo}`,
            method: 'get',
            mock: false,
        })
    },
    // 根据 教室编号 获取 课程表
    queryCoursePlanByClassroomNo(classroomNo: any){
        return request({
            url: `courseplanClassroomNo/${classroomNo}`,
            method: 'get',
            mock: false,
        })
    },
    // 获取所有教师
    getAllTeacher(){
        return request({
            url: 'teacher/all',
            method: 'get',
            mock: false,
        })
    },
    // 获取教学楼编号下的所有教室
    getAllClassroomByTeachbuild(teachbuild_no : any){
        return request({
            url: `classroom/teachbuild/${teachbuild_no}`,
            method: 'get',
            mock: false,
        })
    },
    // 删除课程
    deleteCoursePlanById(planeId : any){
        return request({
            url: `courseplan/delete/${planeId}`,
            method: 'delete',
            mock: false,
        })

    },

    // 获取可选时间
    unUseClassTime(id : any){
        return request({
            url: `courseplan/unuseclasstime/${id}`,
            method: 'post',
            mock: false,
        })
    },
    // 根据班级获取可选时间
    unUseClassTimeByClassNo(classNo : any){
        return request({
            url: `courseplan/unuseclasstimeByClassNo/${classNo}`,
            method: 'post',
            mock: false,
        })
    },

    // 获取可选教室
    unUseClassroom(params : any){
        return request({
            url: `courseplan/unuseclassroom`,
            method: 'post',
            mock: false,
            data: params,
        })
    },

    // 修改课程计划
    updateCoursePlan(params : any){
        return request({
            url: `courseplan/update`,
            method: 'put',
            mock: false,
            data: params,
        })
    },

    //获取所有的课程信息
    allCourseInfoAll(){
        return request({
            url: 'courseinfo/all',
            method: 'get',
            mock: false,
        })
    },

    // 获取该时间段没有上课的老师
    unUseTeacherByClassTime(classTime : any){
        return request({
            url: `courseplan/unuseteacherByClassTime/${classTime}`,
            method: 'post',
            mock: false,
        })
    },
    // 获取该时间段没有上课的教室
    unUseClassroomByClassTimeAndCourseAttr(params : any){
        return request({
            url: `courseplan/unUseClassroomByClassTimeAndCourseAttr`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    // 添加课程计划
    addCoursePlan(params : any){
        return request({
            url: `courseplan/addCoursePlan`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    queryAllSemester(){
        return request({
            url: `allsemester`,
            method: 'get',
            mock: false,
        })
    },
    selectionOptionalLesson(params : any){
        return request({
            url: `selectionOptionalLesson`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    selectionClassRoomNull(params : any){
        return request({
            url: `selectionClassRoomNull`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
    updateCourse(params : any){
        return request({
            url: `updateCourse`,
            method: 'post',
            mock: false,
            data: params,
        })
    },
}